﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BusinessModel
{
    public class EntityModel : INotifyPropertyChanged
    {
        public IList<string> PropertiesChanged { get; set; }

        #region Primitive Properties
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    _Id = value;
                    OnPropertyChanged("Id");
                }
            }
        }
        private global::System.Int32 _Id;
        #endregion

        #region INotifyPropertyChanged Members
        public virtual event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string pPropertyName)
        {
            if (PropertiesChanged != null)
                PropertiesChanged.Add(pPropertyName);
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(pPropertyName));
        }
        #endregion
    }
}
